In general, position detection of a rotary type (or linear type) encoder is formed by a light emitting device, a light receiving device, and a rotary body (or moving body) formed with slits of a grid pattern therebetween and resolution is determined by a slit interval of the grid pattern. Accordingly, the reduction of the slit interval is performed in order to increase the resolution. However, this method has a limitation in increasing the resolution in terms of processing accuracy or optical diffraction effect.
Recently, a method is widely used which increases the resolution by generating analog signals of sinusoidal waves of A and B phases having a phase difference of 90 degrees synchronized with a signal between the slits of the rotary body (or moving body) and combining a signal obtained by interpolating the analog signals with a signal obtained by the slits. A method for correcting phase errors of sinusoidal signals of two phases is being proposed since position detection accuracy is deteriorated when an error occurs in a phase difference between the sinusoidal signals of the A phase and the B phase due to an error in assembly of the light emitting device or the light receiving device and the rotary body, secular variation or temperature variation.
For example, one method is that the phase difference between the A phase and the B phase is set to 90 degrees by computing a sum and difference of the signals after eliminating offsets of the A phase and the B phase (for example, see Patent Document 1).
Furthermore, another method is that a phase error from an intersection point of the A phase and the B phase is obtained, a correction factor from the obtained phase error is calculated, and the phases are corrected using a phase error cancellation/conversion equation for the B phase (for example, see Patent Document 2).
However, the method of Patent Document 1 has a problem in that the amplitudes of the A phase and the B phase after phase correction vary relative to each other. Moreover, the method of Patent Document 1 has a problem in that offsets are to be corrected by computing a maximum value and a minimum value of the A phase and the B phase of the original signals, amplitudes are to be adjusted by obtaining a maximum value and a minimum value of the signals after phase correction, so that it is time-consuming in arithmetic processing.
On the other hand, the method of Patent Document 2 computes a phase error δ and corrects a phase error of the original signal (for example, the B phase) according to sin δ and cos δ. However, there is a problem in that a phase error is accurately not corrected when the phase error is large since an approximate treatment is performed to compute sin δ and amplitude fluctuation affects position detection accuracy since the amplitude fluctuation also occurs.
When arithmetic processing is performed using tables, there is a problem in that two tables for sin and cos computations are required.
In addition, there is a problem in that a shift occurs in phases of an interpolation signal and a signal between slits since the B phase is corrected with reference to one phase (for example, the A phase) and a combination defect occurs when a phase error is large.
[Patent Document 1] Japanese Patent Unexamined Publication No. 2001-296142
[Patent Document 2] Japanese Patent Unexamined Publication No. 9-42995